home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / developer-tools / aros / source / exec / resources / src / addresource.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-16  |  1.1 KB  |  63 lines

  1. /*
  2.     (C) 1995, 96 AROS - The Amiga Replacement OS
  3.     $Id$
  4.     $Log$
  5.     Desc:
  6.     Lang: english
  7. */
  8. #include "exec_intern.h"
  9. #include <aros/libcall.h>
  10.  
  11. /*****************************************************************************
  12.  
  13.     NAME */
  14.     #include <clib/exec_protos.h>
  15.  
  16.     __AROS_LH1(void, AddResource,
  17.  
  18. /*  SYNOPSIS */
  19.     __AROS_LA(APTR, resource, A1),
  20.  
  21. /*  LOCATION */
  22.     struct ExecBase *, SysBase, 81, Exec)
  23.  
  24. /*  FUNCTION
  25.     Adds a given resource to the system's resource list.
  26.  
  27.     INPUTS
  28.     resource - Pointer to a ready for use resource.
  29.  
  30.     RESULT
  31.  
  32.     NOTES
  33.  
  34.     EXAMPLE
  35.  
  36.     BUGS
  37.  
  38.     SEE ALSO
  39.     RemResource(), OpenResource()
  40.  
  41.     INTERNALS
  42.  
  43.     HISTORY
  44.  
  45. ******************************************************************************/
  46. {
  47.     __AROS_FUNC_INIT
  48.  
  49.     /* Just in case the user forgot them */
  50.     ((struct Node *)resource)->ln_Type=NT_RESOURCE;
  51.  
  52.     /* Arbitrate for the resource list */
  53.     Forbid();
  54.  
  55.     /* And add the resource */
  56.     Enqueue(&SysBase->ResourceList,(struct Node *)resource);
  57.  
  58.     /* All done. */
  59.     Permit();
  60.     __AROS_FUNC_EXIT
  61. } /* AddResource */
  62.  
  63.